Skip to content

Consolidate SAMPLED and COLD page heap partitions. - #714

Draft
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_979226826
Draft

Consolidate SAMPLED and COLD page heap partitions.#714
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_979226826

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Sep 10, 2026

Copy link
Copy Markdown

Consolidate SAMPLED and COLD page heap partitions.

Consolidates the SAMPLED and COLD page heap partitions into a single COLD
partition, reducing kNumHeaps from 3 to 2.

Both partitions use MADV_NOHUGEPAGE.

  • PageAllocator: Route sampled memory tags to cold_impl_, allocate cold_impl_
    unconditionally, and remove sampled_impl_ and has_cold_impl_.
  • tcmalloc.cc: Update do_free_with_size and handle_sampled_or_illformed_ptrs to
    properly route and handle sampled allocations in cold_impl_.
  • central_freelist.cc: Assert !free_span->sampled() on deallocation.
  • Update tests to account for sampled allocations carrying MemoryTag::kCold.

@copybara-service
copybara-service Bot force-pushed the test_979226826 branch 2 times, most recently from 5197902 to fe58b1f Compare September 10, 2026 18:46
@copybara-service copybara-service Bot changed the title Merge sampled partition into cold partition. Consolidate SAMPLED and COLD page heap partitions. Sep 10, 2026
Consolidates the SAMPLED and COLD page heap partitions into a single COLD
partition, reducing kNumHeaps from 3 to 2.

Both partitions use MADV_NOHUGEPAGE.

- PageAllocator: Route sampled memory tags to cold_impl_, allocate cold_impl_
  unconditionally, and remove sampled_impl_ and has_cold_impl_.
- tcmalloc.cc: Update do_free_with_size and handle_sampled_or_illformed_ptrs to
  properly route and handle sampled allocations in cold_impl_.
- central_freelist.cc: Assert !free_span->sampled() on deallocation.
- Update tests to account for sampled allocations carrying MemoryTag::kCold.

PiperOrigin-RevId: 979226826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant